﻿@model ccgstore.WebApp.Models.User

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit @Model.Username</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>User</legend>

        @Html.HiddenFor(m => m.Password) <br />
        @Html.HiddenFor(m => m.Role.Name) <br />
        @Html.HiddenFor(m => m.Products) <br />

        @Html.EditorFor(m => m.Name) <br />
        @Html.EditorFor(m => m.Email) <br />
        @Html.EditorFor(m => m.Role) <br />

        <p>
            <input type="submit" value="Save" formaction="Edit" />
            @Html.ActionLink("Cancel", "Index")
        </p>

    </fieldset>
}